<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <table style="margin: auto"  border="1">
        <tr>
            <th>用户id</th>
            <th>用户名</th>
            <th>密码</th>
            <th>用户等级</th>
            <th>操作</th>
        </tr>
        <tr th:each="user : ${userlist}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.name}"></td>
            <td th:text="${user.password}"></td>
            <td th:text="${user.grade}"></td>
            <td>
                <form action="userupdate" method="post">
                    <input type="hidden" name="userid" th:value="${user.id}"><input
                        type="submit" class="but" value="修改">
                </form>
                <form action="deleteUser" method="post">
                    <input type="hidden" name="userid" th:value="${user.id}">
                    <input type="submit" value="删除">
                </form>
            </td>
        </tr>
    </table>
    <form action="userinsert" method="post">
        <input type="submit" value="增加" style="margin-left: 815px">
    </form>
</body>
</html>